﻿@{
    Html.LOBHtmlHelper().SetLayout(this);  
}
@{Html.RenderPartial("LinkPath");}

<div class="mtitle">
    @ViewBag.Title
</div>

@Html.LOBHtmlHelper().Busy("busyMain")

<table  cellpadding="1" cellspacing="1" style="table-layout:fixed;" width="100%">
    <tr>
        <td style="width: 100%;height:100%" valign="top">
            @Html.LOBHtmlHelper().GridView()
        </td>
    </tr>
</table>

<script type="text/javascript">

    var _codeBaseGrid = new CodeBaseGrid();
    $(document).ready(function () {
        _codeBaseGrid.Init(
            "grvtblEmployees",
            "EmployeeID",
            "@Url.Action("View","Employees")",
            "@Url.Action("Edit","Employees")",
            "@Url.Action("Add","Employees")",
            "@Url.Action("Delete","Employees")",
            "@Url.Action("Save","Employees")",
            "CF",
            "CF_tblEmployees",
            "rptEmployees"
            );
        _codeBaseGrid.SetWidthPupop(650);
        _codeBaseGrid.SetHeightPupop(370);
    });

    function View(addOnGrid) {
        _codeBaseGrid.View(addOnGrid);
    }

    function Add(addOnGrid) {
        _codeBaseGrid.Add(addOnGrid);
    }

    function Edit(addOnGrid) {
        _codeBaseGrid.Edit(addOnGrid);
    }

    function Delete(addOnGrid) {
        _codeBaseGrid.Delete(addOnGrid);
    }

    function Save() {
        _codeBaseGrid.Save();
    }

    function Undo() {
        _codeBaseGrid.Undo();
    }

    function Print() {
        _codeBaseGrid.Print();
    }

    function Copy(addOnGrid) {
        _codeBaseGrid.Copy(addOnGrid);
    }

</script>
